﻿@model ReferralTracker.Models.Account.RegisterUserModel

@section scripts {
    <script src="@Url.Content("~/Scripts/Account/registeruser.js")" type="text/javascript"></script>
}

@using (Html.BeginForm("RegisterUser", "Account", FormMethod.Post, new { id = "form1" })) {
    <table>
        <thead>
            <tr>
                <td>Account Details</td>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>@Html.LabelFor(m => m.FirstName)</td>
                <td>@Html.TextBoxFor(m => m.FirstName)</td>
            </tr>
            <tr>
                <td>@Html.LabelFor(m => m.LastName)</td>
                <td>@Html.TextBoxFor(m => m.LastName)</td>
            </tr>
            <tr>
                <td>@Html.LabelFor(m => m.Email)</td>
                <td>@Html.TextBoxFor(m => m.Email)</td>
            </tr>
            <tr>
                <td>@Html.LabelFor(m => m.Password)</td>
                <td>@Html.PasswordFor(m => m.Password)</td>
            </tr>
            <tr>
                <td>Confirm Password</td>
                <td><input id="ConfirmPassword" type="password" /></td>
            </tr>
            <tr>
                <td>@Html.LabelFor(m => m.ParentReferralId)</td>
                <td>
                
                @if (ViewBag.IsCookiePresent) {
                    @Html.TextBoxFor(m => m.ParentReferralId, new { @Value = ViewBag.ReferralId, disabled = "disabled" })
                }
                else {
                    @Html.TextBoxFor(m => m.ParentReferralId, new { @Value = ViewBag.ReferralId })
                }
                </td>
            </tr>
            <tr>
                <td></td>
                <td>
                    <p>This field is the referral Id that will be credited when you register your account. Change this field if you want another referral Id to be credited.</p>
                </td>
            </tr>
        </tbody>
    </table>
    <input id="btnRegister" type="button" value="Register" onclick="javascript:referraltracker.account.registeruser.saveUser()" />
}

